package hang.xipujewelWeb.repository.jpa;

import hang.xipujewelWeb.entity.account.User;
import hang.xipujewelWeb.repository.JpaDao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;

public interface UserDao extends JpaDao<User> {
	User findByLoginName(String loginName);

	List<User> findByType(int type);

	@Query("From User u where u.loginName=?1 and (type=0 or type=1)")
	public User findByLoginNameAndType01(String loginName);

	public User findByLoginNameAndSourcePassword(String loginName, String sourcePassword);
}
